_pos = [(_this select 0) select 0, (_this select 0) select 1, 0];
_num = _this select 1;
_rad = _this select 2;

_op = switch (side player) do 
{
    case side0: 
    {
        getMarkerPos format["respawn_%1", side1]
    };
    case side1:
    {
        getMarkerPos format["respawn_%1", side0]
    };
};
if ((_op distance _pos) < 2400) exitWith {player groupChat "Illegal deployment";};

_mp = getMarkerPos format["respawn_%1", side player];
_basepos = [_mp select 0, _mp select 1, 0];

_t = switch (side player) do
{
    case side0:
    {
        _v = createVehicle [side0_transportChopper, _basepos, [], 0, "FLY"];
        _g = createGroup side0;
        _p = _g createUnit [side0_pilot, position player, [], 100, "FORM"];
        [_p] join _g;
        _return = [_v,_p];

        _return
    };
    case side1:
    {
        _v = createVehicle [side1_transportChopper, _basepos, [], 0, "FLY"];
        _g = createGroup side1;
        _p = _g createUnit [side1_pilot, position player, [], 100, "FORM"];
        [_p] join _g;
        _return = [_v,_p];

        _return
    };
};
player groupChat "Chopper moving out";
_vehicle = _t select 0;
_pilot = _t select 1;

_pilot moveInDriver _vehicle;

onMapSingleClick "";

[_vehicle, [_pos], 70, true] execVM "funcs\mando_heliroute_arma.sqf";
Sleep 2;
waitUntil {_vehicle getVariable "mando_heliroute" != "busy"};
waitUntil {((getPos _pilot select 2) < 15) && ((position _pilot) distance _pos < 100)};	// <-- May not be necessary?

if (alive _vehicle) then {player sideChat "beginning mining"; s = [position _vehicle, _num, _rad] execVM "funcs\kte_miner.sqf"}; 

_pilot move _basepos;

waitUntil {unitReady _pilot};
deleteVehicle _pilot;
deleteVehicle _vehicle;
